using System;
using UnityEngine;

namespace com.susi.util.toolkit
{
    public class UnityDebugObserver<T> : IObserver<T>
    {
        public static UnityDebugObserver<T> Instance { get; private set; } = new UnityDebugObserver<T>();
        
        public void OnCompleted()
        {
            Debug.Log($"[notice]OnCompleted.");
        }

        public void OnError(Exception error)
        {
            Debug.Log($"[notice]{error}:{error.Message}.");
        }

        public void OnNext(T value)
        {
            Debug.Log($"[notice]{value}.");
        }
    }
}